package vn.com.salon.manager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import vn.com.salon.dao.ProductDao;
import vn.com.salon.domain.Product;
import vn.com.salon.model.ProductModel;

@Component
public class ProductManagerImpl implements ProductManager{

	@Autowired
	private ProductDao productDao;
	
	@Override
	public int insert(ProductModel productModel){
		Product product = productModel.toProduct();
		return productDao.insert(product);
	}
}
